def display(triangle):
    print("\n".join(" ".join(str(num) for num in row).center(len(triangle[-1]) * 2) for row in triangle))

# 示例：创建一个杨辉三角形的二维列表
triangle = [
    [1],
    [1, 1],
    [1, 2, 1],
    [1, 3, 3, 1],
    [1, 4, 6, 4, 1]
]

# 调用函数打印杨辉三角形
display(triangle)
